﻿using NodeCanvas.Framework;
using ParadoxNotion.Design;

namespace Yoozoo.Gameplay.Liberty.AI.Node
{
    [Category("Ggame/Liberty")]
    public class ChangePathDirection : AIBaseNode
    {
        protected override void OnExecute()
        {
            if (_entity.data.pathDirection == PathDirection.Backward)
            {
                _entity.data.pathDirection = PathDirection.Forward;
            }
            else
            {
                _entity.data.pathDirection = PathDirection.Backward;
            }
            
            EndAction(true);
        }
    }
}